package com.example.contact.model

import androidx.room.Entity
import androidx.room.ForeignKey
import androidx.room.Index
import com.example.featuresdk.model.User

@Entity(
    primaryKeys = ["ownerId","contactId"],
    foreignKeys = [ForeignKey(
        entity = User::class,
        parentColumns = ["id"],
        childColumns = ["ownerId"]
    ),
        ForeignKey(entity = User::class, parentColumns = ["id"], childColumns = ["contactId"])],
    indices = [Index("contactId")])
data class Contact(
    val ownerId: Long,
    val contactId: Long,
    val label: String? = null,//标签
    var name: String? = null //备注
    )